import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '../components/tabbar/homebar.vue'
import member from '../components/tabbar/memberbar.vue'
import search from '../components/tabbar/searchbar.vue'
import shopcar from '../components/tabbar/shopcarbar.vue'
import newslist from '../components/news/newslist.vue'
import newsinfo from '../components/news/newsInfo.vue'
import photolist from '../components/photos/photoList.vue'
import photoinfo from '../components/photos/photoinfo.vue'
import goodslist from '../components/goods/goodslist.vue'
import goodsinfo from '../components/goods/goodsinfo.vue'
import goodsDesc from '../components/goods/GoodsDesc.vue'
import goodsComment from '../components/goods/GoodsComment.vue'
Vue.use(VueRouter)
let router = new VueRouter({
    routes: [{
        path: "/home", component: home
    }, {
        path: "/member", component: member
    }, {
        path: "/search", component: search
    }, {
        path: "/shopcar", component: shopcar
    }, {
        path: "/home/homelist", component: newslist
    },, {
        path: "/home/newsinfo/:id", component: newsinfo
    }, {
        path: "/home/photolist", component: photolist
    }, {
        path: "/home/photoinfo/:id", component: photoinfo
    }, {
        path: "/home/goodslist", component: goodslist
    }, {
        path: "/home/goodsinfo/:id", component: goodsinfo
    }, {
        path: "/home/goodsDesc/:id", component: goodsDesc, name: "goodsDesc"
    }, {
        path: "/home/goodsComment/:id", component: goodsComment, name: 'goodsComment'
    }, {
        path: '/', redirect: '/home'
    }],
    linkActiveClass: 'mui-active'
})
export default router